import type { App, Component } from "vue"
import SvgIcon from "./Svgicon/index.vue"
import Category from "./Category/index.vue"

// 引入图标库
import * as ElementPlusIconsVue from '@element-plus/icons-vue'


const allComponents: { [name: string]: Component } = {
    SvgIcon,
    Category
}

export default {
    install(app: App) {
        Object.keys(allComponents).forEach((key: string) => {
            app.component(key, allComponents[key])
        });

        for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
            app.component(key, component)
        }
    }
}